<?php
include_once '../../Model/M_SubRubro.php';

$subrubro = new M_SubRubro();

$subrubro->setIdRubro($_REQUEST['codigo']);
$lista = $subrubro->searchSubRubro_PorRubro();

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
?>
<head>
    
    <style>        
            .subRubro{
                float: left;
                padding: 10px;
                margin: 4px;
                border: 4px solid #A8A8A8;
                border-collapse: collapse;
                -webkit-box-shadow: 3px 3px 3px #A8A8A8;
                -moz-box-shadow: 3px 3px 3px #A8A8A8;
                background: #f3e2c7;
                background: -moz-linear-gradient(-45deg,  #f3e2c7 0%, #c19e67 50%, #b68d4c 51%, #e9d4b3 100%);
                background: -webkit-gradient(linear, left top, right bottom, color-stop(0%,#f3e2c7), color-stop(50%,#c19e67), color-stop(51%,#b68d4c), color-stop(100%,#e9d4b3));
                background: -webkit-linear-gradient(-45deg,  #f3e2c7 0%,#c19e67 50%,#b68d4c 51%,#e9d4b3 100%);
                background: -o-linear-gradient(-45deg,  #f3e2c7 0%,#c19e67 50%,#b68d4c 51%,#e9d4b3 100%);
                background: -ms-linear-gradient(-45deg,  #f3e2c7 0%,#c19e67 50%,#b68d4c 51%,#e9d4b3 100%);
                background: linear-gradient(135deg,  #f3e2c7 0%,#c19e67 50%,#b68d4c 51%,#e9d4b3 100%);
                filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f3e2c7', endColorstr='#e9d4b3',GradientType=1 );
            }
            .subRubro:hover{
                float: left;
                padding: 10px;
                margin: 4px;
                border: 4px solid #A8A8A8;
                border-collapse: collapse;
                -webkit-box-shadow: 3px 3px 3px #A8A8A8;
                -moz-box-shadow: 3px 3px 3px #A8A8A8;
                background: #f2825b;
                background: -moz-linear-gradient(-45deg,  #f2825b 0%, #e55b2b 50%, #f07146 100%);
                background: -webkit-gradient(linear, left top, right bottom, color-stop(0%,#f2825b), color-stop(50%,#e55b2b), color-stop(100%,#f07146));
                background: -webkit-linear-gradient(-45deg,  #f2825b 0%,#e55b2b 50%,#f07146 100%);
                background: -o-linear-gradient(-45deg,  #f2825b 0%,#e55b2b 50%,#f07146 100%);
                background: -ms-linear-gradient(-45deg,  #f2825b 0%,#e55b2b 50%,#f07146 100%);
                background: linear-gradient(135deg,  #f2825b 0%,#e55b2b 50%,#f07146 100%);
                filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f2825b', endColorstr='#f07146',GradientType=1 );
            }
            .subRubroTitulo2{
                text-align: center;
                border: 4px solid #A8A8A8;
                width: 100px;
            }
            .subRubroNombre{
                text-align: center;
                font-size: 12px;
                text-shadow: 3px 3px 3px #aaa;
                text-decoration: none;
                color: black;
            }
</style>
<script type='text/javascript' src='../js/funciones.js'></script>
</head>
<body>   
    <div>SUB RUBROS</div>
    <? for($i=0; $i<count($lista); $i++){ ?>
    <a href="javascript:FAjax('../Pedido/V_Producto.php', 'productos', 'codigo=<?=$lista[$i]['id_sub_rubro']?>', 'POST');">
    <div class="subRubro" id="pro<?= $lista[$i]['id_sub_rubro'] ?>">
        <div class="subRubroTitulo2">
            <img height="70" width="100" src="../images/SubRubro/<?=$lista[$i]['imagen'];?>"/>
        </div>
        <div class="subRubroNombre">
            <?= $lista[$i]['nombre']; ?>
        </div>
    </div>
    </a>
    <?}?>
</body>

